<template>
  <div>
    <!-- <so-header :seller="headerTitle"></so-header> -->
    <headerText title="我的" :settext="settitle" @done="gotobtn"></headerText>

    <div class="content">
        <!-- 头部浮层 -->
        <div class="main-suspension"> 
            <div class="suspension-top"></div>
            <div class="suspension-info" @click="Uupdate()">
                <div class="suspension-info-top clear" style="margin-top:0.8rem;">
                    <em class="header_img_top">
                      <img :src="this.avatar" ref="userImg">
                    </em>
                    <div class="suspension-info-top-center" style="margin-top: -0.2rem !important;">
                        <h2>
                          <span v-if="userInfo.username" style="display:inline-block;max-width: 2rem;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;">{{userInfo.username}} &nbsp; </span><span style="font-size: 0.22rem; color:#999;display:inline-block;max-width: 2rem;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;" v-else>暂无数据</span>
                          <span v-if="userInfo.position" style="font-size: 0.22rem; color:#999;display:inline-block;max-width: 1rem;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;">{{userInfo.position}}</span> <span style="font-size: 0.22rem; color:#999;display:inline-block;max-width: 1rem;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;" v-else>暂无数据</span>
                        </h2>
                        <!-- <h2 v-else>暂无数据 &nbsp; </h2> -->
                        <p v-if="userInfo.company_status == 1">
                            <!-- <span><i class="iconfont icon-renzheng1" style="color: #e50838; font-size: 0.2rem !important;"></i></span> -->
                            <span class="company_name" v-if="userInfo.company_name">{{userInfo.company_name}}</span>
                            <span class="company_name" v-else>暂无数据</span>
                            <!-- <span style="color:#e50838;">已认证</span> -->
                        </p>
                        <p v-else>
                            <!-- <span><i class="iconfont icon-renzheng1" style="font-size: 0.2rem !important;"></i></span> -->
                            <span class="company_name" v-if="userInfo.company_name">{{userInfo.company_name}}</span>
                            <span class="company_name" v-else>暂无数据</span>
                            <!-- <span><img src="../common/images/wei.png"></span> -->
                            <!-- <span style="text-decoration:underline; color:#999;">未认证</span> -->
                        </p>
                        <!-- <p>IT互联网 | </p> -->
                        <!-- <p v-if="userInfo.mobile"><i class="iconfont icon-dianhua1"></i>{{userInfo.mobile}}</p> -->
                        <p v-if="userInfo.mobile">友圈号：<span style="color: #e50838;">{{userInfo.mobile}}</span></p>
                        <p v-else>友圈号：暂无数据</p>
                        <!-- <p v-else><i class="iconfont icon-dianhua1"></i>暂无数据</p> -->
                    </div>
                    <div class="suspension-info-top-right" style="line-height: 0.9rem;">
                        <a href="javascript:void(0)">
                          <i class="iconfont icon-xiangyou" style="color: #999 !important;"></i>
                        </a>
                        <!-- <a href="javascript:void(0)" @click="Uupdate(stau)">
                            <i class="iconfont icon-bianji icon_editor"></i>{{editortext}}
                        </a> -->
                    </div>
                </div>
                <!-- <div class="tag_show">
                    <div class="tag_show_list">
                        <span>#IT互联网</span>
                        <span>#实名认证</span>
                        <span>#诚信</span>
                        <span>#6年行业经验</span>
                        <span>#实名认证</span>
                    </div>
                </div> -->
            </div>
        </div>

        <!-- 我的企业 -->
        <div class="main_company">
            <div class="title_text_more">
              <h3>我的企业</h3>
              <router-link to="/userCompany">更多<i class="iconfont icon-xiangyou"></i></router-link>
            </div>
            <div class="company_list">
              <!-- 我的企业 -->
                <div class="all_company_ul">
                    <div class="all_company_ul_item" v-for="(list, l) in companylist" :key="l">
                      <!-- 自己创建企业已认证/已通过 -->
                        <div class="auth_item" v-if="list.auth_flag == 2" @click="incompanyIndex(list.id,1)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-"></i> 
                            <strong>
                              <img class="auth_img" :src="list.log_img" v-if="list.log_img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-else>
                            </strong>
                            <span style="line-height: 0.3rem;">{{list.name}}</span>
                        </div>
                        <!-- 自己创建企业待审核 -->
                        <div class="auth_item" v-else-if="list.auth_flag == 1" @click="JumpcompanyList([list.id,list.auth_flag,list.name,list.check])">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-2"></i> 
                            <strong>
                              <img class="auth_img" :src="list.log_img" v-if="list.log_img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-else>
                            </strong>
                            <small>待审核</small>
                            <span style="line-height: 0.3rem;">{{list.name}}</span>
                        </div>
                         <!-- 加入他人企业待审核通过 -->
                        <div class="auth_item" v-else-if="list.auth_flag == 4" @click="JumpcompanyList([list.id,list.auth_flag,list.name,list.check])">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-3"></i> 
                            <strong>
                              <img class="auth_img" :src="list.log_img" v-if="list.log_img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-else>
                            </strong>
                            <small>待通过</small>
                            <span style="line-height: 0.3rem;">{{list.name}}</span>
                        </div>
                        <!-- 加入他人企业已通过 -->
                        <div class="auth_item" v-if="list.auth_flag == 3" @click="incompanyIndex(list.id,2)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-1"></i> 
                            <strong>
                              <img class="auth_img" :src="list.log_img" v-if="list.log_img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-else>
                            </strong>
                            <span style="line-height: 0.3rem;">{{list.name}}</span>
                        </div>
                        <!-- 加入他人企业被拒绝或自己创建企业未认证 -->
                        <div class="auth_item" v-if="list.auth_flag == 0" @click="JumpcompanyList([list.id,list.auth_flag,list.name,list.check])" >
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-2"></i> 
                            <strong>
                              <img class="auth_img" :src="list.log_img" v-if="list.log_img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-else>
                            </strong>
                            <small>未认证</small>
                            <span style="line-height: 0.3rem;">{{list.name}}</span>
                        </div>
                    </div>
                    <div class="all_company_ul_item" @click="addCompany">
                      <i class="iconfont icon-jiaru"></i>
                    </div>
                </div>
            </div>
        </div>

        <!-- 我的圈子 -->
        <div class="main_company">
            <div class="title_text_more">
              <h3>我的圈子</h3>
              <router-link to="/userCircle">更多<i class="iconfont icon-xiangyou"></i></router-link>
            </div>
            <div class="company_list">
                <!-- 我的圈子 -->
                <div class="all_company_ul">
                    <div class="all_company_ul_item" v-for="(c_list, ind) in circlelist" :key="ind">
                      <!-- 自己创建圈子已通过 -->
                        <div class="auth_item" v-if="c_list.c_check_status == 1" @click="incircleIndex(c_list.cid,1)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-"></i> 
                            <strong>
                              <img class="auth_img" :src="c_list.img" v-if="c_list.img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-if="c_list.c_type == 3 && !c_list.img">
                              <span class="img_user_one" style="color: #DD948E;" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span>
                              <!-- <span class="img_user_one" style="color: #fff;" :style="'background-color:' + c_list.bgcolor" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span> -->
                            </strong>
                            <span style="line-height: 0.3rem;">{{c_list.c_name}}</span>
                        </div>
                        <!-- 加入他人圈子待审核 -->
                        <div class="auth_item" v-if="c_list.c_check_status == 4" @click="JumpList(c_list.cid,c_list.c_check_status)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-3"></i> 
                            <strong>
                              <img class="auth_img" :src="c_list.img" v-if="c_list.img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-if="c_list.c_type == 3 && !c_list.img">
                              <span class="img_user_one" style="color: #DD948E;" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span>
                              <!-- <span class="img_user_one" style="color: #fff;" :style="'background-color:' + c_list.bgcolor" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span> -->
                            </strong>
                            <small>待通过</small>
                            <span style="line-height: 0.3rem;">{{c_list.c_name}}</span>
                        </div>
                        <!-- 加入他人圈子已通过 -->
                        <div class="auth_item" v-if="c_list.c_check_status == 5" @click="incircleIndex(c_list.cid,2)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-1"></i> 
                            <strong>
                              <img class="auth_img" :src="c_list.img" v-if="c_list.img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-if="c_list.c_type == 3 && !c_list.img">
                              <span class="img_user_one" style="color: #DD948E;" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span>
                              <!-- <span class="img_user_one" style="color: #fff;" :style="'background-color:' + c_list.bgcolor" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span> -->
                            </strong>
                            <span style="line-height: 0.3rem;">{{c_list.c_name}}</span>
                        </div>
                        <!-- 加入他人圈子未通过 -->
                        <div class="auth_item" v-if="c_list.c_check_status == 3" @click="JumpList(c_list.cid,c_list.c_check_status)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-2"></i> 
                            <strong>
                              <img class="auth_img" :src="c_list.img" v-if="c_list.img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-if="c_list.c_type == 3 && !c_list.img">
                              <span class="img_user_one" style="color: #DD948E;" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span>
                              <!-- <span class="img_user_one" style="color: #fff;" :style="'background-color:' + c_list.bgcolor" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span> -->
                            </strong>
                            <small>未通过</small>
                            <span style="line-height: 0.3rem;">{{c_list.c_name}}</span>
                        </div>
                        <!-- 自己创建圈子待通过 -->
                        <div class="auth_item" v-if="c_list.c_check_status == 2" @click="JumpList(c_list.cid,c_list.c_check_status)">
                            <i class="iconfont icon-qiyezhuangtaibiaozhi-2"></i> 
                            <strong>
                              <img class="auth_img" :src="c_list.img" v-if="c_list.img" alt="">
                              <img class="auth_img" src="../common/images/youquan.png" alt="" v-if="c_list.c_type == 3 && !c_list.img">
                              <span class="img_user_one" style="color: #DD948E;" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span>
                              <!-- <span class="img_user_one" style="color: #fff;" :style="'background-color:' + c_list.bgcolor" v-if="c_list.c_type == 1 || c_list.c_type == 2">{{c_list.c_name.substring(0,1)}}</span> -->
                            </strong>
                            <small>待审核</small>
                            <span style="line-height: 0.3rem;">{{c_list.c_name}}</span>
                        </div>
                    </div>
                    <div class="all_company_ul_item" @click="addCircle">
                      <i class="iconfont icon-jiaru"></i>
                    </div>
                </div>



                <!-- <ul>
                    <li v-for="(c_list, ind) in circlelist" :key="ind">
                        <p class="clear" @click="incircleIndex(c_list.cid)">
                            <img :src="c_list.img" v-if="c_list.img">
                            <img src="../common/images/default_head.jpg" v-else/>
                            <small>{{c_list.c_name}}</small>
                        </p>
                        <div class="btn_small_red no_btn">
                            <button @click="JumpList(c_list.cid,c_list.c_check_status)" v-if="c_list.c_check_status == 2">待通过</button>
                            <button @click="JumpList(c_list.cid,c_list.c_check_status)" v-else-if="c_list.c_check_status == 1">已认证</button>                           
                        </div>                        
                    </li>
                    <li class="active" @click="addCircle">
                        <i class="iconfont icon-tianjia company_active_icon"></i>
                        <span>添加圈子</span>
                    </li>
                </ul> -->
            </div>
        </div>

        <!-- moreOther -->
        <div class="moreOther">
            <!-- <router-link to="/userCenter/userWallet" class="main_menu">
              <label for="">我的钱包</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link> -->
            <router-link to="/UserCard" class="main_menu">
              <label for="">智能名片</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link>
            <!-- <a href="javascript:void(0)" class="main_menu">
              <label for="">我的海报</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </a> -->

            <router-link to="/userCenter/productManage?u_type=1" class="main_menu" v-if="userInfo.adminstatus == 1">
              <label for="">我的产品</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link>
            <router-link to="/userCenter/newsManage?u_type=1" class="main_menu" v-if="userInfo.adminstatus == 1">
              <label for="">我的新闻</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link>

            <!-- <router-link to="/medalList" class="main_menu">
              <label for="">我的勋章</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link> -->
            <!-- <router-link to="/Myintegral" class="main_menu">
              <label for="">我的积分</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link> -->
            <router-link to="/myCollection" class="main_menu">
              <label for="">我的收藏</label>
              <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link>

            <!-- <router-link :to="more.link" class="main_menu" v-for="(more, m) in moreOthers" :key="m">
                <label for="">{{more.otherName}}</label>
                <a href="javascript:void(0)"><i class="iconfont icon-xiangyou"></i></a>
            </router-link> -->
        </div>
    </div>
    <!-- <webim ref="Mywebim"></webim> -->
    <so-footer></so-footer>
  </div>
</template>

<script>
  import headerText from '../public/header-text.vue';
  // import webim from '../components/webim';
  import soFooter from '../components/footer-bar';
  // import chater from '../components/chater';
  // import { showChat, createApply } from '../api/api';
  import {
    MessageBox
  } from 'mint-ui';
  import {
    Swipe,
    SwipeItem
  } from 'mint-ui';

  export default {
    data() {
      return {
        // path: 'http://fc.x.e000.com',
        headerTitle: '我的',
        options: '',
        circlelist: '',
        companylist: '',
        userInfo: '',
        companyWidth: '',
        circleWidth: '',
        // path: this.$path,
        settitle: '设置',
        stau: 1,
        editortext: '编辑',
        // descShow: false,
        // companyLiWidth: (document.body.clientWidth / 3) + 8,
        // screenWidth: (document.body.clientWidth / 3) + 8,
        companyLiAvatarHeight: '',
        userImgHeight: '',
        // ucompanyInfo: '',
        avatar:'/static/img/userAvatar.2652b77.png',
        // webim:'',
      };
    },
    components: {
      soFooter,
      headerText,
      // webim
    },
    created() {
      let that = this;
      let login_style = window.localStorage.getItem('login_style');
      that.userInfo = window.localStorage.getItem('userInfo');
      that.userInfo = JSON.parse(that.userInfo);
      that.avatar = that.userInfo.userhead;
      that.getcircleList(that.userInfo.uid);
      that.getCompanyList(that.userInfo.uid);   
      
      console.log('chat_id_user',window.localStorage.getItem('chat_id'));
    },  
    mounted () {
      let login_style = window.localStorage.getItem('login_style');
     
      console.log('login_style',login_style);
      this.userImgHeight = this.$refs.userImg.offsetWidth;
      let access_token = window.localStorage.getItem('access_token');

      this.shareLink = this.$path;
      // console.log('第二步');
      // this.showChat();
      /*
         加载聊天系统组件
       */
      // this.webim = this.$refs.Mywebim;
      // if(login_style == 'login'){
      //   console.log('进来login了');
      //   this.webim.system('欢迎回来');
      //   localStorage.removeItem('login_style');
      // }else if(login_style == 'register'){  
      //   console.log('进来register了');
      //   this.webim.system('欢迎成为新用户');
      //   localStorage.removeItem('login_style');
      // }

      // 新用户自动添加系统为好友
      // if(login_style == 'register'){
      //    createApply({targetId: 0,reason:'系统消息',access_token: access_token,system:1}).then(res => {
      //       //需要返回一个
      //       console.log('第一步添加系统为好友',res);
      //       if (parseInt(res.status) === 1) {
      //         //创建聊天对象
      //         createChat({targetId:0}).then( res => {
      //             console.log('第二步创建系统为聊天对象');
      //         })

      //       }
      //   })
      // }
      
      
    },
    methods: {

      showChat(){
        // this.$store.commit('setPage', 2);
        let chat_id = window.localStorage.getItem('chat_id');
        if(!chat_id){
          // showChat().then(res =>{
          //   window.localStorage.setItem('chat_id',res.chat.chat_id);
          //   console.log('查看聊天对象:',res);          
          // })
        }
        
        // this.$store.commit('setPage', 1);
      },
      gotobtn() {
        this.$router.push({
          path: '/Setting'
        })
      },
      // createCompany() {
      //   this.$router.push({path: '/company'})
      // }
      //添加圈子
      addCircle: function () {
        let that = this;
        let uid = that.userInfo.uid;
        console.log('uid',uid);
        this.$post(
            that.$path + '/api.php/company/getAuthCompanyList', {
              userId: uid,
              type:0
            })
          .then((res) => {
            if (res.code == '-1') {
              MessageBox.alert('您需要先绑定企业').then(action => {
                this.$router.push({
                  path: '/companyCreate'
                });
              });
            } else {
              this.$router.push({
                path: '/crcircle'
              });
            }

          })
      },
      //添加公司
      addCompany: function () {
        this.$router.push({
          path: '/companyCreate'
        });
      },
      getcircleList: function (uid) {
        let that = this;
        // console.log(Math.ceil(that.screenWidth / 3));
        this.$fetch(that.$path + '/api.php/Circle/getcircleList', {
            uid: that.userInfo.uid,type:"2"
          })
          .then((res) => {
            console.log(res);
            if (res.code == 200) {
              // that.circleWidth = (Number(res.data.length) + 1) * (that.companyLiWidth + 15) + 10;
              that.circlelist = res.data;
              console.log('圈子展示',that.circlelist)
            }
          });
      },
      getCompanyList: function (uid) {
        let that = this;
        this.$fetch(that.$path + '/api.php/company/getUserAllCompanyList', {
            userId: uid
          })
          .then((res) => {
            console.log(res);
            if (res.data.count < 1) {
              that.companylist = '';
            } else {
              //计算头像的宽度
              // that.companyLiAvatarHeight = that.companyLiWidth * 0.2;
              // that.companyWidth = (Number(res.data.list.length) + 1) * (that.companyLiWidth + 15) + 10;
              that.companylist = res.data.list;
              console.log('that.companylist', res.data.list.id)
            }
          });
      },
      JumpList: function (event, status) {
        if (status == 2) {
          // MessageBox('提示', '请耐心等待管理员审核...')
          MessageBox.confirm('', {
            message: '请耐心等待管理员审核...',
            title: '提示',
            confirmButtonText: '查看',
            cancelButtonText: '取消'
          }).then(action => {
            if (action == 'confirm') { //确认的回调
              this.$router.push({
                path: '/userCenter/circleindex',
                query: {
                  paicheNo: event,
                }
              })
            }
          }).catch(err => {
            if (err == 'cancel') { //取消的回调
              return false;
            }
          });
          return false;
        } else {
          // this.$router.push({
          //   path: '/userCenter/circleindex',
          //   query: {
          //     paicheNo: event
          //   }
          // });
          MessageBox.confirm('', {
            message: '圈子审核中...',
            title: '提示',
            confirmButtonText: '查看',
            cancelButtonText: '取消'
          }).then(action => {
            if (action == 'confirm') { //确认的回调
              this.$router.push({
                path: '/userCenter/circleindex',
                query: {
                  paicheNo: event,
                }
              })
            }
          }).catch(err => {
            if (err == 'cancel') { //取消的回调
              return false;
            }
          });
          return false;
        }

      },
      JumpcompanyList: function (event) {
        // console.log('99999=>',event[1]);return false;
        // 获取flag标记，如果属于待认证跳转到认证页面，否则跳转到企业资料页面。
        if (event[3] == 0) {
          // MessageBox('提示', '等待管理员审核...')
          // return false;
          MessageBox.confirm('', {
            message: '等待管理员审核...',
            title: '提示',
            confirmButtonText: '查看',
            cancelButtonText: '取消'
          }).then(action => {
            if (action == 'confirm') { //确认的回调
             //点击企业跳转到企业主页
                if(this.$system != 'ios'){
                    this.$router.push({
                      path: '/userCenter/companyIndex',
                      query: {
                        cp_id: event[0],
                      }
                    })
                }else{
                    window.location.href = '/userCenter/companyIndex?cp_id=' + event[0];
                }       
            }
          }).catch(err => {
            if (err == 'cancel') { //取消的回调
              return false;
            }
          });
          return false;
        }else if(event[1] == 1) {
          // MessageBox('提示', '企业审核中...')
          // return false;
          MessageBox.confirm('', {
            message: '企业审核中...',
            title: '提示',
            confirmButtonText: '查看',
            cancelButtonText: '取消'
          }).then(action => {
            if (action == 'confirm') { //确认的回调
              //点击企业跳转到企业主页
                if(this.$system != 'ios'){
                    this.$router.push({
                      path: '/userCenter/companyIndex',
                      query: {
                        cp_id: event[0],
                      }
                    })
                }else{
                    window.location.href = '/userCenter/companyIndex?cp_id=' + event[0];
                }       
            }
          }).catch(err => {
            if (err == 'cancel') { //取消的回调
              return false;
            }
          });
          return false;
        }else if (event[1] == 0) {
          MessageBox.confirm('', {
            message: '企业未认证，是否认证？',
            title: '提示',
            confirmButtonText: '去认证',
            cancelButtonText: '取消'
          }).then(action => {
            if (action == 'confirm') { //确认的回调
              this.$router.push({
                path: '/Certification',
                query: {
                  companyId: event[0],
                  companyName: event[2]
                }
              })
            }
          }).catch(err => {
            if (err == 'cancel') { //取消的回调
              return false;
            }
          });
          return false;
        } else {
          this.$router.push({
            path: '/userCenter/companyData',
            query: {
              cpId: event[0]
            }
          });
        }
      },

      //点击进入企业首页
      incompanyIndex(id,n) {
        if(n == 1){
            this.$router.push({path: '/userCenter/companyData', query: {cpId:id,u_type:1}}); 
        }else{
            this.$router.push({path: '/userCenter/companyData', query: {cpId:id,u_type:2}}); 
        }
        
      },
      //点击进入圈子首页
      incircleIndex(event,n) {
        if(n == 1){
          this.$router.push({
            path: '/userCenter/CircleData',
            query: {
              paicheNo: event
            }
          });
        }else{
          this.$router.push({
            path: '/userCenter/circleindex',
            query: {
              paicheNo: event
            }
          });
        }
        
      },
      // gotoClick(data)
      // { 
      //   console.log('进来了',data);
      //   console.log('webim啊',this.$refs.Mywebim.system(data));
      // },
      //获取用户相关信息
      // getUserInfos: function (event) {
      //   let that = this;
      //   let uid = event;
      //   this.$fetch(that.$path + '/api.php/company/getUserCompanyInfo', {
      //       userId: uid
      //     })
      //     .then((res) => {
      //       console.log(uid);
      //       if (res.code == 200) {
      //         that.userInfo = res.data;
      //       } else {
      //         that.userInfo = '';
      //       }
      //     });
      // },
      //用户信息修改
      Uupdate() {
        // let that = this;
				// if(stau == 1){//点击编辑
				// 		that.editortext = '保存';
				// 		that.stau =2;
        // }else{//点击保存
        //   let desc = this.$refs.mybox.innerHTML; 
        //   // console.log(desc);return false;
				// 	that.editortext = '编辑';
				// 	that.stau =1;
        // }
        // this.descShow = !this.descShow;
        this.$router.push({
          path: '/NewUserUpdate'
        });
      }

    }
  }

</script>
<style>
  @import '../common/css/userCenter.css';
  .y-company {
    position: absolute;
  }
  .mintui {
    font-size: 0.36rem;
  }

  .y-company li {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.2rem;
    height: 1.45rem !important;
    width: 2.66rem !important;
  }

  .y-company li button {
    margin: 0 auto;
  }

  .y-company li button label {
    font-size: 0.22rem
  }

  /* 待审核按钮 */
  .no_btn {
    margin-left: 0.7rem !important;
  }

/* 企业名称 */
.company_name {
  display: inline-block;
  /* width: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  overflow: hidden; */
  vertical-align: bottom;
}
.icon-renzheng1 {
  font-size: 0.22rem;
}
.icon-dianhua1 {
  font-size: 0.22rem !important;
  color: #333 !important;
}
.icon-xunzhang1,
.icon-medal-star {
  font-size: 0.3rem !important;
}

/* 标签 */
.tag_show {
    padding: 0 0.2rem;
    width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 1rem;
    margin: 0.16rem auto;
}
.tag_show .tag_show_list {
    border-top: 1px solid #d8d8d8;
    box-sizing: border-box;
    padding: 0.24rem;
    text-align: left;
}
.tag_show .tag_show_list span {
    border: 1px solid #d8d8d8;
    font-size: .22rem;
    background-color: transparent;
    color: #999;
    padding: .04rem;
    float: left;
    margin-right: .1rem;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin-bottom: 0.2rem;
    line-height: 0.5rem;
}


.company_description {
		border: 1px dashed #d8d8d8;
    height: auto;
    line-height: 0.42rem;
    margin: 0 .2rem;
    /* padding: 0.1rem; */
		
}

/* 圈子默认截取第一个字 */
.auth_item .img_user_one {
    width: 1rem !important;
    height: 1rem;
    vertical-align: super;
    font-size: 0.3rem !important;
    line-height: 1rem;
    text-align: center;
    position: absolute;
    border-radius: 50%;
    top: 0.1rem;
    left: 50%;
    margin-left: -0.5rem;
    background: url('../common/images/UI-04.png') no-repeat center;
    background-size: cover;
}




</style>
